home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19960209-19960425 / 000444_news@columbia.edu _Fri Apr 19 09:14:21 1996.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: news@columbia.edu
  2. Received: from apakabar.cc.columbia.edu (apakabar.cc.columbia.edu [128.59.35.159]) by watsun.cc.columbia.edu (8.7.5/8.7.3) with ESMTP id JAA18822 for <kermit.misc@watsun>; Fri, 19 Apr 1996 09:14:20 -0400 (EDT)
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.7.5/8.7.3) id JAA01219 for kermit.misc@watsun; Fri, 19 Apr 1996 09:14:17 -0400 (EDT)
  4. Path: news.columbia.edu!lamont.ldeo.columbia.edu!news.er.usgs.gov!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!news.moneng.mei.com!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!davis
  5. From: davis@space.mit.edu (John E. Davis)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: DOS-kermit 3.14 problem with Linux color ls
  8. Date: 19 Apr 1996 04:42:41 GMT
  9. Organization: Center for Space Research
  10. Lines: 38
  11. Message-ID: <slrn4ne6e1.mbp.davis@wiwaxia.mit.edu>
  12. References: <4jfcgh$r60@news.ccit.arizona.edu> <BRIDGE.96Apr18113208@gerbil.cig.mot.com> <1996Apr18.181143.78552@cc.usu.edu>
  13. Reply-To: davis@space.mit.edu
  14. NNTP-Posting-Host: wiwaxia.mit.edu
  15. X-Newsreader: slrn (0.8.8 UNIX)
  16.  
  17. On 18 Apr 96 18:11:43 MDT, Joe Doupnik <jrd@cc.usu.edu>
  18. wrote:
  19.  :     b) Talk with the Linux people about how to write colored displays.
  20.  :     Joe D.
  21.  
  22. I do not know exactly what you are referring to but, in my opinion, the
  23. linux console handles color correctly.  It, like `rxvt' and the new version
  24. of color xterm (unreleased, in beta test) uses the so-called ``new-color
  25. model'' where the CURRENT background color is used for erasing by escape
  26. sequences that clear various regions of the screen (e.g., clear screen,
  27. erase to end of line, etc). To my knowledge, MS-Kermit uses the old color
  28. model where the screen is erased using the DEFAULT background color.
  29.  
  30. This distinction has a very important impact on efficiency.  For example,
  31. suppose that default background color is BLUE and, for whatever reason, some
  32. program wants to turn the screen RED.  How can this be done?  
  33.  
  34. If the terminal erases using the CURRENT background color, this can be
  35. achieved by setting the background color to RED and then clearing the
  36. screen, e.g.,
  37.  
  38.     ESC [ 4 1 m ESC [ 2 J
  39.     
  40. which means that only 9 characters are needed to do this.  If the terminal
  41. erases using the DEFAULT background color and, as in this example, that
  42. color is BLUE, this method will not work because the screen will be erased
  43. using BLUE.  As a result, if the terminal does not support an escape
  44. sequence to set the DEFAULT background color, the program will have to set
  45. the CURRENT color to red
  46.  
  47.    ESC [ 4 1 m
  48.  
  49. and then write 24 x 80 = 1920 space characters for a 24x80 screen!!!
  50. -- 
  51. John E. Davis                   Center for Space Research/AXAF Science Center
  52. 617-258-8119                    MIT 37-662c, Cambridge, MA 02139
  53. http://space.mit.edu/~davis
  54.